﻿namespace WenAntdUI.Controls;


/// <summary>
/// 自定义 MenuItem 模型
/// </summary>
/// <param name="code"></param>
/// <param name="name"></param>
/// <param name="iconSvg"></param>
public class MenuTagItem(string code, string name, string? iconSvg)
{
    /// <summary>
    /// 菜单项唯一编码
    /// </summary>
    public string Code { get; set; } = code;

    /// <summary>
    /// 菜单项显示名称
    /// </summary>
    public string Name { get; set; } = name;

    /// <summary>
    /// Svg 图标
    /// </summary>
    public string? IconSvg { get; set; } = iconSvg;

    /// <summary>
    /// 菜单项绑定的用户控件 typeof(UserControl)
    /// </summary>
    public Type? PageType { get; set; }

    /// <summary>
    /// 是否允许关闭页面
    /// </summary>
    public bool Closeable { get; set; } = true;

    /// <summary>
    /// 子菜单集合
    /// </summary>
    public List<MenuTagItem> Sub { get; set; } = [];
}
